<div id='detailShowContent'></div>
<script type='text/html' id='detailContent'>
    <div class='layui-row' style='margin-top: 20px;'>
        <div class='layui-col-sm8'>
            <div style='margin:0px 40px;line-height: 27px;'>
                <i class='layui-icon layui-icon-file-b'></i><span>{{ d.name }}</span>
                <input type='hidden' value='{{ d.id }}' name='contract_id' id='contract_id'/>
                <input type='hidden' value='{{ d.name }}' name='contract_id_name' id='contract_id_name'/>
                <input type='hidden' value='{{ d.money }}' name='contract_money' id='contract_money'/>
                <input type='hidden' value='{{ d.customer_id }}' name='customer_id' id='customer_id'/>
            </div>
        </div>

    </div>
    <div class='layui-row' style='margin-top: 20px;'>
        <div class='layui-col-sm12'>
            <table class='layui-table'>
                <tr>
                    <td>合同编号</td>
                    <td>合同状态</td>
                    <td>客户名称</td>
                    <td>合同金额（元）</td>
                    <td>下单时间</td>
                    <td>负责人</td>
                </tr>
                <tr>
                    <td>{{ d.num }}</td>
                    <td>{{ d.price }}</td>
                    <td>{{ d.customer_id_name }}</td>
                    <td>{{ d.money }}</td>
                    <td>{{ d.order_date }}</td>
                    <td>{{ d.owner_user_name }}</td>
                </tr>
            </table>
        </div>
    </div>
    <div class='layui-row' style='margin-top: 20px;'>
        <div class='layui-col-sm12'>
            <div class='layui-tab layui-tab-card' lay-filter='detailCard'>
                <ul class='layui-tab-title'>
                    <li class='layui-this'>跟进记录</li>
                    <li>基础信息</li>
                    <li>回款计划</li>
                    <li>回款信息</li>
                </ul>
                <div class='layui-tab-content'>
                    <div class='layui-tab-item layui-show'>
                        <div class='layui-btn-group' style='margin:5px 0px 20px 20px;'>
                            <button class='layui-btn layui-btn-normal layui-btn-sm' type='button'
                                    lay-event="contract.addRecordEvent()">新建跟进
                            </button>
                        </div>
                        <table class='layui-hide' id='recordTable' lay-filter='recordTable' lay-size='sm'
                               style='width: 100%'></table>
                    </div>

                    <div class='layui-tab-item'>
                        <div class='layui-card'>
                            <div class='layui-card-header'>基础信息</div>
                            <div class='layui-card-body'>
                                <table style='width: 100%;'>
                                    <tr>
                                        <td>合同编号:{{ d.num }}</td>
                                        <td>合同名称:{{ d.name }}</td>
                                    </tr>
                                    <tr>
                                        <td>合同金额:{{ d.money }}</td>
                                        <td>下单时间:{{ d.order_date }}</td>
                                    </tr>
                                    <tr>
                                        <td>合同开始时间:{{ d.start_time }}</td>
                                        <td>合同结束时间:{{ d.start_time }}</td>
                                    </tr>

                                    <tr>
                                        <td>是否含税:
                                            {{# if(d.is_tab==1){ }}
                                            含税
                                            {{# }else{ }}
                                            不含税
                                            {{# } }}
                                        </td>
                                        <td>客户签约人:{{ d.customer_id_name }}</td>
                                    </tr>
                                    <tr>
                                        <td>公司签约人:{{ d.order_user_id_name }}</td>
                                        <td></td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>

                    <div class='layui-tab-item'>
                        <div class='layui-btn-group' style='margin:5px 0px 20px 20px;'>
                            <button class='layui-btn layui-btn-normal layui-btn-sm' type='button'
                                    lay-event="contract.addReceivablesPlan();" ;>新建回款计划
                            </button>
                        </div>
                        <table class='layui-hide' id='receivablesPlanTable' lay-filter='receivablesPlanTable'
                               lay-size='sm'
                               style='width: 100%'></table>
                    </div>

                    <div class='layui-tab-item'>
                        <div class='layui-btn-group' style='margin:5px 0px 20px 20px;'>
                            <button class='layui-btn layui-btn-normal layui-btn-sm' type='button'
                                    lay-event='contract.addReceivables();' ;>新建回款
                            </button>
                        </div>
                        <table class='layui-hide' id='receivablesTable' lay-filter='receivablesTable'
                               lay-size='sm'
                               style='width: 100%'></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</script>
<script type='text/html' id='return_type_id_name'>
    {{# for(var ipd in pagedict.return_type){ }}
    {{# if(d.return_type_id ==ipd){ }}
    <span>{{ pagedict.return_type[ipd] }}</span>
    {{# } }}
    {{# } }}
</script>


